#ifndef KEYSYM_TOOLS
#define KEYSYM_TOOLS

#include <X11/XF86keysym.h>

#include "debug.h"

#define GET_KEYSIM_FROM_STRING(key,retkey) { if(!strcmp(string,key)) return retkey; }

KeySym getKeySymFromString(const char *string)
{
        DEBUGSTR("gKSFS ["<<string<<"]");
        
	GET_KEYSIM_FROM_STRING("XF86MonBrightnessUp",XF86XK_MonBrightnessUp)     
	GET_KEYSIM_FROM_STRING("XF86MonBrightnessDown",XF86XK_MonBrightnessDown)   
	GET_KEYSIM_FROM_STRING("XF86KbdLightOnOff",XF86XK_KbdLightOnOff)       
	GET_KEYSIM_FROM_STRING("XF86KbdBrightnessUp",XF86XK_KbdBrightnessUp)     
	GET_KEYSIM_FROM_STRING("XF86KbdBrightnessDown",XF86XK_KbdBrightnessDown)   
	GET_KEYSIM_FROM_STRING("XF86Standby",XF86XK_Standby)		   
	GET_KEYSIM_FROM_STRING("XF86AudioLowerVolume",XF86XK_AudioLowerVolume)	   
	GET_KEYSIM_FROM_STRING("XF86AudioMute",XF86XK_AudioMute)	   
	GET_KEYSIM_FROM_STRING("XF86AudioRaiseVolume",XF86XK_AudioRaiseVolume)	   
	GET_KEYSIM_FROM_STRING("XF86AudioPlay",XF86XK_AudioPlay)	   
	GET_KEYSIM_FROM_STRING("XF86AudioStop",XF86XK_AudioStop)	   
	GET_KEYSIM_FROM_STRING("XF86AudioPrev",XF86XK_AudioPrev)	   
	GET_KEYSIM_FROM_STRING("XF86AudioNext",XF86XK_AudioNext)	   
	GET_KEYSIM_FROM_STRING("XF86HomePage",XF86XK_HomePage)		   
	GET_KEYSIM_FROM_STRING("XF86Mail",XF86XK_Mail)		   
	GET_KEYSIM_FROM_STRING("XF86Start",XF86XK_Start)		   
	GET_KEYSIM_FROM_STRING("XF86Search",XF86XK_Search)		   
	GET_KEYSIM_FROM_STRING("XF86AudioRecord",XF86XK_AudioRecord)	   
	GET_KEYSIM_FROM_STRING("XF86Calculator",XF86XK_Calculator)	   
	GET_KEYSIM_FROM_STRING("XF86Memo",XF86XK_Memo)		   
	GET_KEYSIM_FROM_STRING("XF86ToDoList",XF86XK_ToDoList)		   
	GET_KEYSIM_FROM_STRING("XF86Calendar",XF86XK_Calendar)		   
	GET_KEYSIM_FROM_STRING("XF86PowerDown",XF86XK_PowerDown)	   
	GET_KEYSIM_FROM_STRING("XF86ContrastAdjust",XF86XK_ContrastAdjust)	   
	GET_KEYSIM_FROM_STRING("XF86RockerUp",XF86XK_RockerUp)		   
	GET_KEYSIM_FROM_STRING("XF86RockerDown",XF86XK_RockerDown)	   
	GET_KEYSIM_FROM_STRING("XF86RockerEnter",XF86XK_RockerEnter)	   
	GET_KEYSIM_FROM_STRING("XF86Back",XF86XK_Back)		   
	GET_KEYSIM_FROM_STRING("XF86Forward",XF86XK_Forward)		   
	GET_KEYSIM_FROM_STRING("XF86Stop",XF86XK_Stop)		   
	GET_KEYSIM_FROM_STRING("XF86Refresh",XF86XK_Refresh)		   
	GET_KEYSIM_FROM_STRING("XF86PowerOff",XF86XK_PowerOff)		   
	GET_KEYSIM_FROM_STRING("XF86WakeUp",XF86XK_WakeUp)		   
	GET_KEYSIM_FROM_STRING("XF86Eject",XF86XK_Eject)               
	GET_KEYSIM_FROM_STRING("XF86ScreenSaver",XF86XK_ScreenSaver)         
	GET_KEYSIM_FROM_STRING("XF86WWW",XF86XK_WWW)                 
	GET_KEYSIM_FROM_STRING("XF86Sleep",XF86XK_Sleep)               
	GET_KEYSIM_FROM_STRING("XF86Favorites",XF86XK_Favorites)	   
	GET_KEYSIM_FROM_STRING("XF86AudioPause",XF86XK_AudioPause)	   
	GET_KEYSIM_FROM_STRING("XF86AudioMedia",XF86XK_AudioMedia)	   
	GET_KEYSIM_FROM_STRING("XF86MyComputer",XF86XK_MyComputer)	   
	GET_KEYSIM_FROM_STRING("XF86VendorHome",XF86XK_VendorHome)	   
	GET_KEYSIM_FROM_STRING("XF86LightBulb",XF86XK_LightBulb)	   
	GET_KEYSIM_FROM_STRING("XF86Shop",XF86XK_Shop)		   
	GET_KEYSIM_FROM_STRING("XF86History",XF86XK_History)		   
	GET_KEYSIM_FROM_STRING("XF86OpenURL",XF86XK_OpenURL)		   
	GET_KEYSIM_FROM_STRING("XF86AddFavorite",XF86XK_AddFavorite)	   
	GET_KEYSIM_FROM_STRING("XF86HotLinks",XF86XK_HotLinks)		   
	GET_KEYSIM_FROM_STRING("XF86BrightnessAdjust",XF86XK_BrightnessAdjust)	   
	GET_KEYSIM_FROM_STRING("XF86Finance",XF86XK_Finance)		   
	GET_KEYSIM_FROM_STRING("XF86Community",XF86XK_Community)	   
	GET_KEYSIM_FROM_STRING("XF86AudioRewind",XF86XK_AudioRewind)	   
#ifdef XF86XK_XF86BackForward
	GET_KEYSIM_FROM_STRING("XF86XF86BackForward",XF86XK_XF86BackForward)	   
#endif
	GET_KEYSIM_FROM_STRING("XF86Launch0",XF86XK_Launch0)		   
	GET_KEYSIM_FROM_STRING("XF86Launch1",XF86XK_Launch1)		   
	GET_KEYSIM_FROM_STRING("XF86Launch2",XF86XK_Launch2)		   
	GET_KEYSIM_FROM_STRING("XF86Launch3",XF86XK_Launch3)		   
	GET_KEYSIM_FROM_STRING("XF86Launch4",XF86XK_Launch4)		   
	GET_KEYSIM_FROM_STRING("XF86Launch5",XF86XK_Launch5)		   
	GET_KEYSIM_FROM_STRING("XF86Launch6",XF86XK_Launch6)		   
	GET_KEYSIM_FROM_STRING("XF86Launch7",XF86XK_Launch7)		   
	GET_KEYSIM_FROM_STRING("XF86Launch8",XF86XK_Launch8)		   
	GET_KEYSIM_FROM_STRING("XF86Launch9",XF86XK_Launch9)		   
	GET_KEYSIM_FROM_STRING("XF86LaunchA",XF86XK_LaunchA)		   
	GET_KEYSIM_FROM_STRING("XF86LaunchB",XF86XK_LaunchB)		   
	GET_KEYSIM_FROM_STRING("XF86LaunchC",XF86XK_LaunchC)		   
	GET_KEYSIM_FROM_STRING("XF86LaunchD",XF86XK_LaunchD)		   
	GET_KEYSIM_FROM_STRING("XF86LaunchE",XF86XK_LaunchE)		   
	GET_KEYSIM_FROM_STRING("XF86LaunchF",XF86XK_LaunchF)		   
	GET_KEYSIM_FROM_STRING("XF86ApplicationLeft",XF86XK_ApplicationLeft)	   
	GET_KEYSIM_FROM_STRING("XF86ApplicationRight",XF86XK_ApplicationRight)	   
	GET_KEYSIM_FROM_STRING("XF86Book",XF86XK_Book)		   
	GET_KEYSIM_FROM_STRING("XF86CD",XF86XK_CD)		   
	GET_KEYSIM_FROM_STRING("XF86Calculater",XF86XK_Calculater)	   
	GET_KEYSIM_FROM_STRING("XF86Clear",XF86XK_Clear)		   
	GET_KEYSIM_FROM_STRING("XF86Close",XF86XK_Close)		   
	GET_KEYSIM_FROM_STRING("XF86Copy",XF86XK_Copy)		   
	GET_KEYSIM_FROM_STRING("XF86Cut",XF86XK_Cut)		   
	GET_KEYSIM_FROM_STRING("XF86Display",XF86XK_Display)		   
	GET_KEYSIM_FROM_STRING("XF86DOS",XF86XK_DOS)		   
	GET_KEYSIM_FROM_STRING("XF86Documents",XF86XK_Documents)	   
	GET_KEYSIM_FROM_STRING("XF86Excel",XF86XK_Excel)		   
	GET_KEYSIM_FROM_STRING("XF86Explorer",XF86XK_Explorer)		   
	GET_KEYSIM_FROM_STRING("XF86Game",XF86XK_Game)		   
	GET_KEYSIM_FROM_STRING("XF86Go",XF86XK_Go)		   
	GET_KEYSIM_FROM_STRING("XF86iTouch",XF86XK_iTouch)		   
	GET_KEYSIM_FROM_STRING("XF86LogOff",XF86XK_LogOff)		   
	GET_KEYSIM_FROM_STRING("XF86Market",XF86XK_Market)		   
	GET_KEYSIM_FROM_STRING("XF86Meeting",XF86XK_Meeting)		   
	GET_KEYSIM_FROM_STRING("XF86MenuKB",XF86XK_MenuKB)		   
	GET_KEYSIM_FROM_STRING("XF86MenuPB",XF86XK_MenuPB)		   
	GET_KEYSIM_FROM_STRING("XF86MySites",XF86XK_MySites)		   
	GET_KEYSIM_FROM_STRING("XF86New",XF86XK_New)		   
	GET_KEYSIM_FROM_STRING("XF86News",XF86XK_News)		   
	GET_KEYSIM_FROM_STRING("XF86OfficeHome",XF86XK_OfficeHome)	   
	GET_KEYSIM_FROM_STRING("XF86Open",XF86XK_Open)		   
	GET_KEYSIM_FROM_STRING("XF86Option",XF86XK_Option)		   
	GET_KEYSIM_FROM_STRING("XF86Paste",XF86XK_Paste)		   
	GET_KEYSIM_FROM_STRING("XF86Phone",XF86XK_Phone)		   
	GET_KEYSIM_FROM_STRING("XF86Q",XF86XK_Q)		  
	GET_KEYSIM_FROM_STRING("XF86Reply",XF86XK_Reply)		   
	GET_KEYSIM_FROM_STRING("XF86Reload",XF86XK_Reload)		   
	GET_KEYSIM_FROM_STRING("XF86RotateWindows",XF86XK_RotateWindows)	   
	GET_KEYSIM_FROM_STRING("XF86RotationPB",XF86XK_RotationPB)	   
	GET_KEYSIM_FROM_STRING("XF86RotationKB",XF86XK_RotationKB)	   
	GET_KEYSIM_FROM_STRING("XF86Save",XF86XK_Save)		   
	GET_KEYSIM_FROM_STRING("XF86ScrollUp",XF86XK_ScrollUp)		   
	GET_KEYSIM_FROM_STRING("XF86ScrollDown",XF86XK_ScrollDown)	   
	GET_KEYSIM_FROM_STRING("XF86ScrollClick",XF86XK_ScrollClick)	   
	GET_KEYSIM_FROM_STRING("XF86Send",XF86XK_Send)		   
	GET_KEYSIM_FROM_STRING("XF86Spell",XF86XK_Spell)		   
	GET_KEYSIM_FROM_STRING("XF86SplitScreen",XF86XK_SplitScreen)	   
	GET_KEYSIM_FROM_STRING("XF86Support",XF86XK_Support)		   
	GET_KEYSIM_FROM_STRING("XF86TaskPane",XF86XK_TaskPane)		   
	GET_KEYSIM_FROM_STRING("XF86Terminal",XF86XK_Terminal)		   
	GET_KEYSIM_FROM_STRING("XF86Tools",XF86XK_Tools)		   
	GET_KEYSIM_FROM_STRING("XF86Travel",XF86XK_Travel)		   
	GET_KEYSIM_FROM_STRING("XF86UserPB",XF86XK_UserPB)		   
	GET_KEYSIM_FROM_STRING("XF86User1KB",XF86XK_User1KB)		   
	GET_KEYSIM_FROM_STRING("XF86User2KB",XF86XK_User2KB)		   
	GET_KEYSIM_FROM_STRING("XF86Video",XF86XK_Video)		   
	GET_KEYSIM_FROM_STRING("XF86WheelButton",XF86XK_WheelButton)	   
	GET_KEYSIM_FROM_STRING("XF86Word",XF86XK_Word)		   
	GET_KEYSIM_FROM_STRING("XF86Xfer",XF86XK_Xfer)		
	GET_KEYSIM_FROM_STRING("XF86ZoomIn",XF86XK_ZoomIn)		   
	GET_KEYSIM_FROM_STRING("XF86ZoomOut",XF86XK_ZoomOut)		   
	GET_KEYSIM_FROM_STRING("XF86Away",XF86XK_Away)		   
	GET_KEYSIM_FROM_STRING("XF86Messenger",XF86XK_Messenger)	   
	GET_KEYSIM_FROM_STRING("XF86WebCam",XF86XK_WebCam)		   
	GET_KEYSIM_FROM_STRING("XF86MailForward",XF86XK_MailForward)	   
	GET_KEYSIM_FROM_STRING("XF86Pictures",XF86XK_Pictures)		   
	GET_KEYSIM_FROM_STRING("XF86Music",XF86XK_Music)		   
	GET_KEYSIM_FROM_STRING("XF86Switch",XF86XK_Switch_VT_1)	
	GET_KEYSIM_FROM_STRING("XF86Switch",XF86XK_Switch_VT_2)	
	GET_KEYSIM_FROM_STRING("XF86Switch",XF86XK_Switch_VT_3)	
	GET_KEYSIM_FROM_STRING("XF86Switch",XF86XK_Switch_VT_4)	
	GET_KEYSIM_FROM_STRING("XF86Switch",XF86XK_Switch_VT_5)	
	GET_KEYSIM_FROM_STRING("XF86Switch",XF86XK_Switch_VT_6)	
	GET_KEYSIM_FROM_STRING("XF86Switch",XF86XK_Switch_VT_7)	
	GET_KEYSIM_FROM_STRING("XF86Switch",XF86XK_Switch_VT_8)	
	GET_KEYSIM_FROM_STRING("XF86Switch",XF86XK_Switch_VT_9)	
	GET_KEYSIM_FROM_STRING("XF86Switch",XF86XK_Switch_VT_10)	
	GET_KEYSIM_FROM_STRING("XF86Switch",XF86XK_Switch_VT_11)	
	GET_KEYSIM_FROM_STRING("XF86Switch",XF86XK_Switch_VT_12)	
	GET_KEYSIM_FROM_STRING("XF86Ungrab",XF86XK_Ungrab)		   
	GET_KEYSIM_FROM_STRING("XF86ClearGrab",XF86XK_ClearGrab)	   
	GET_KEYSIM_FROM_STRING("XF86Next",XF86XK_Next_VMode)	   
	GET_KEYSIM_FROM_STRING("XF86Prev",XF86XK_Prev_VMode)	 


	DEBUGSTR("NO MATCH!")
	return NoSymbol;
}  


#endif
